package org.joy;

import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.JedisClientConfig;
import redis.clients.jedis.JedisPooled;

public class JedisClient {
    public static void main(String[] args) {
        JedisClientConfig config = DefaultJedisClientConfig.builder()
                .ssl(true).build();
        HostAndPort address = new HostAndPort("193.123.235.142", 6379);
        JedisPooled jedis = new JedisPooled(address, config);
        jedis.set("foo", "bar");
        System.out.println(jedis.get("foo")); // prints bar
    }
}
